Release 10.1A: OpenEdge Development:
Programming Interfaces


Creating a dynamic ProDataSet with XML Schema

In this code sample, an XML Schema file that defines four temp-table buffers is read into a new dynamic ProDataSet:

/* pi-tfx-read-3.p */ 
/* Provides a new dynamic ProDataSet with XML Schema. */ 
{pi-tfx-parameterVarDefs.i} 
DEFINE VARIABLE returnValue AS LOGICAL. 
  
DEFINE VARIABLE hDSET AS HANDLE. 
CREATE DATASET hDSET. 
     
ASSIGN 
    cSourceType = "FILE" 
    cFile = "Dept400.xsd" 
    lOverrideDefaultMapping = ? 
    cFieldTypeMapping = ? 
    cVerifySchemaMode = ?. 
DISPLAY "Reading XML Schema..." SKIP. 
     
returnValue = hDSET:READ-XMLSCHEMA(cSourceType, cFile, 
                                   lOverrideDefaultMapping, 
                                   cFieldTypeMapping, cVerifySchemaMode). 
IF returnValue THEN 
    DISPLAY "How many temp-table buffers in the dynamic ProDataSet?"  
             hDSET:NUM-BUFFERS "." 

The code displays the following information:


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095